package dyyx;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Properties;

import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.util.Base64Utils;

public class Base64UtilsTest {
	private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;

	public static void main(String[] args) throws Exception {			
		String str = "中国人民站起来了 China people stand up";
		byte[] bytes = str.getBytes(DEFAULT_CHARSET);
		
		String str2 = Base64Utils.encodeToString(bytes);
		
		System.out.println(str2);

		
		String str3 = Base64Utils.encodeToUrlSafeString(bytes);
		
		System.out.println(str3);


		
	}
}
